# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=sambascan
pkgver=0.5.0
pkgrel=3
groups=('blackarch' 'blackarch-scanner')
pkgdesc='Allows you to search an entire network or a number of hosts for SMB shares. It will also list the contents of all public shares that it finds.'
arch=('any')
url='http://sourceforge.net/projects/sambascan2/'
license=('GPL2')
depends=('bash' 'nmap' 'samba')
source=("http://downloads.sourceforge.net/project/sambascan2/sambascan2-$pkgver.tar.gz")
sha512sums=('572c77ceae1f47cc0db2f3b5d56c69b7f78115d64a0ae8b8583a4f3e3db771053fb3178dd68b6f39411b4daf63c61b180208e981d9ee0b6a158b6ec670b5eecf')

build() {
  cd "${pkgname}2-$pkgver"

  ./configure --prefix=/usr
}

package() {
  cd "${pkgname}2-$pkgver"

  install -Dm 755 sambascan2 "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" AUTHORS ChangeLog NEWS \
    THANKS INSTALL README TODO
  install -Dm 644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

